// 导入express
const express = require('express');
const path = require('path')
const homeRouter = require('./routers/homeRouter')
const adminRouter = require('./routers/adminRouter')


// 创建应用
const app = express();
app.use(homeRouter).use(adminRouter)

app.use(express.static(path.resolve(__dirname, './assets')))


// 监听端口，启用服务
app.listen(3000, () => {
    console.log('服务已启动，port 3000 正在监听...');
})

